package org.travel.app.entity.spots;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.travel.app.entity.ticket.TicketType;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author nmm
 * @date 2024-12-2024/12/19
 * @deriction 景点票实体
 */
@Data
public class SpotsTickets {
    /**
     * 景点票id
     */
    private Integer spotsTicketsId;

    /**
     * 景点id
     */
    private  Integer spotsId;

    /**
     * 景点票具体票种类型
     */
    private TicketType type;

    /**
     * 景点类型id
     */
    private Integer typeId;

    /**
     * 票价
     */
    private BigDecimal price;

    /**
     * 库存
     */
    private Integer stockId;

    /**
     * 门票的生效时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate validityStart;

    /**
     * 门票的过期时间
     */
    private LocalDate validityEnd;

    /**
     * 折扣
     */
    private BigDecimal discount;

    /**
     * 是否启用
     */
    private Integer isActive;
}